home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 4 / ETO Development Tools 4.iso / Essentials / MacApp Documentation / MacApp.TECH$ Archives / 1990 / May 90 / MacApp.Tech$ 5⁄25⁄90 / 1326-Re Codegen fatal err-May90 < prev    next >
Encoding:
Text File  |  1991-03-06  |  1.7 KB  |  46 lines  |  [TEXT/GEOL]

  1. Item    7242122                         21-May-90        19:11DST
  2.  
  3. From:   UK0392                          EHN & DIJ Oakley,IDV
  4.  
  5. To:     A.XSE007                        Austria - Orthosoft,J Mayrbauer,IDV
  6.  
  7. cc:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    Re Codegen fatal error
  10.  
  11. Juergen,
  12.  
  13. Welcome to the codegen error club!  I have reported a very similar codegen bug
  14. in 3.1 Pascal, only this time it occurred when the FPU flag was on.
  15.  
  16. What I did to work around was to repeat compile with various bits of the source
  17. commented out (don't worry about whether it would work, though) just to locate
  18. the troublesome line.  The chances are, if it is similar to the bug that I
  19. found, it was where you tried to assign to a field of an object, and probably a
  20. real number or something similar.  To reassure yourself that it is a compiler
  21. problem, you might like to skip the MacII and Sys6 flags, and just try it with
  22. a plain -nodebug or -debug flag (and no others) - you should not get a code
  23. generation problem then.
  24.  
  25. Once you have located the troublesome line(s), try to make them simpler for the
  26. code generator - if it comes down to altering a field, then write a little
  27. method for the class which owns that field to alter it, e.g.
  28.  
  29. {if this is the problem line}
  30. aMyObject.fThisField := aValue;
  31. {then try something like}
  32. aMyObject.AlterThisField(aValue);
  33. {where you have a little method:}
  34. PROCEDURE TMyObject.AlterThisField(theValue: DATATYPE);
  35. BEGIN
  36.    fThisField := theValue;
  37. END;
  38.  
  39. When you have isolated the problem, build a really stripped down test program,
  40. and file a proper bug report using Outside Bug Reporter, to MAC.DTS.  You will
  41. find them most helpful, and in the end we will all benefit as they will fix the
  42. bug for us all!
  43.  
  44. Regards, Howard.
  45.  
  46.